home *** CD-ROM | disk | FTP | other *** search
- /*
- * FILE: segment.h
- * AUTHOR: R. Gonzalez
- * CREATED: October 2, 1990
- *
- * Defines general-purpose segment and nested segments for picture
- * application. All graphics figures descend from Segment.
- */
-
- # ifndef segment_h
- # define segment_h
-
- # include "class.h"
- # include "trans.h"
- # include "camera.h"
- # include "project.h"
- # include "color.h"
-
- # define MAX_SEGMENTS 50
-
- /******************************************************************
- * abstract segment
- ******************************************************************/
- struct Segment:Generic_Class
- {
- virtual void set_color(color);
- virtual void draw(Camera*,Projector*,Transformation*);
- virtual void move(Transformation*);
- };
-
- /******************************************************************
- * abstract nested segment
- ******************************************************************/
- struct Nested_Segment:Segment
- {
- Transformation *transformation;
- Segment *segment[MAX_SEGMENTS];
- int num_segments;
-
- boolean init(void);
- void set_color(color);
- void draw(Camera*,Projector*,Transformation*);
- void move(Transformation*);
- boolean destroy(void);
- };
-
- # endif